/*
 * \file defs.h
 * \author Ameen Jaber
 * \author Mohamad Noureddine
 * \author Mohamed Sabra
 * \brief Contains needed definitions for parse graph edges and nodes
 */
#ifndef DEFS_H_
#define DEFS_H_

#include <list>
#include <util.h>
#include <utility>
#include <InData.h>
#include <TPType.h>
#include <InDGraph.h>
#include <pppnode.h>
/**
 * Define the TripleP Nodes
 */
typedef struct TPNode TPNode_t;

/**
 * Define the TripleP Edges
 */
typedef struct TPEdge TPEdge_t;

/** 
 * Define the TripleP Parse Graph
 */
typedef boost::adjacency_list < boost::vecS, boost::vecS, boost::directedS, TPNode_t , TPEdge_t > TPGraph_t; 

/**
 * Define the variable table
 */
typedef std::map<std::string, int> TPTable_t;

/**
 * Define a reverse variable table
 */
typedef std::map<int, std::string> revTPTable_t;

/**
 * Define a map between name and type construct 
 */
typedef std::map<std::string, TPType *> TypeTable_t;

/**
 * Define a hash map between variable name and type construct
 */
typedef boost::unordered_map<std::string, TPType *> VariableTable_t;

/**
 * Define a hash map between the name of Graph and its construct
 */
typedef boost::unordered_map<std::string, InDGraph *> GraphTable_t;

/**
 * Define a structure for the traversal the parse graph
 */
struct graphStruct
{
  TPGraph_t * graph;
  revTPTable_t * Vname;
  TPTable_t * VID;
};

/**
 * Define a hash map between variable name and class object
 */
typedef boost::unordered_map<std::string,object*> varTable_t;

/**
 * Define a map from string to pppgraph
 */
typedef std::map<std::string, PPPWGraph *> Gwmap_t;

/*
 * Define a map from string to pppgraph not weighted
 */
typedef std::map<std::string, PPPGraph *> Gmap_t;

/**
 * Define a hash map between name of algorithm and algorithm struct
 */
typedef boost::unordered_map<std::string, _algorithm*> algMap_t;
#endif
